#include "SeqList.h"

void test1()
{
	SL s1;
	SeqListInit(&s1);

	SeqListPushBack(&s1, 1);
	SeqListPushBack(&s1, 2);
	SeqListPushBack(&s1, 3);
	SeqListPushBack(&s1, 4);
	SeqListPushBack(&s1, 5);

	SeqListPopBack(&s1);
	SeqListPopBack(&s1);
	SeqListPopBack(&s1);
	SeqListPopBack(&s1);
	SeqListPopBack(&s1);
	SeqListPopBack(&s1);
	SeqListPopBack(&s1);

	SeqListPushBack(&s1, 5);
	SeqListPushBack(&s1, 5); 
	SeqListPushBack(&s1, 5);

	SeqListPrint(&s1);

	SeqListDestory(&s1);
}



void test2()
{
	SL s2;
	SeqListInit(&s2);
	SeqListPushBack(&s2, 1);
	SeqListPushBack(&s2, 2);
	SeqListPushBack(&s2, 3);
	SeqListPushBack(&s2, 4);
	SeqListPushBack(&s2, 5);

	SeqListPushFront(&s2, 10);
	SeqListPushFront(&s2, 20);
	SeqListPushFront(&s2, 30);
	SeqListPushFront(&s2, 10);
	SeqListPushFront(&s2, 10);
	SeqListPushFront(&s2, 10);
	SeqListPushFront(&s2, 10);
	SeqListPopFront(&s2);
	SeqListPopFront(&s2);

	SeqListPopFront(&s2);


	SeqListPrint(&s2);
	
	SeqListDestory(&s2);

}

void test3()
{
	SL s3;
	SeqListInit(&s3);
	SeqListPushBack(&s3, 1);
	SeqListPushBack(&s3, 2);
	SeqListPushBack(&s3, 3);
	SeqListPushBack(&s3, 4);

	SeqListInsert(&s3, 2, 10);

	SeqListPrint(&s3);

	int ret = SeqListFind(&s3, 10);
	printf("%d\n", ret);

	SeqListEarse(&s3, 1);
	SeqListPopBack(&s3);
	SeqListPushFront(&s3, 100);
	SeqListPopFront(&s3);
	SeqListPrint(&s3);
	SeqListDestory(&s3);
}
int main()
{
	//test1();
	//test2();
	//test3();
	return 0;
}